package com.example.user1.service.translat;

import com.example.user1.cmd.*;
import com.example.user1.infra.mapper.entity.UserEntity;
import com.example.user1.infra.model.UserModel;
import com.example.user1.vo.UserInfoVo;
import org.mapstruct.Mapper;
import org.mapstruct.MappingConstants;
import org.mapstruct.MappingTarget;

import java.util.List;

@Mapper(componentModel = MappingConstants.ComponentModel.SPRING)
public interface UserTanslator {

    UserInfoVo toUserInfoVo(UserModel model);
    UserInfoVo toUserInfoVo(UserEntity entity);
    List<UserInfoVo> toUserInfoVos(List<UserEntity> list);

    UserModel toUserModel(UserInfoCmd cmd);

    UserModel toUserModel(RegistryUserPasswordCmd cmd);

    UserEntity fillUserEntity(@MappingTarget UserEntity userEntity, UserInfoModifyCmd cmd);

    UserEntity fillUserEntity(@MappingTarget UserEntity userEntity, ModifyProfilePictureCmd cmd);

    UserEntity toUserModel(RegistryUserPhoneCmd cmd);
}
